Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to change gridColumns per Container #113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

samsonovkirill
Copy link

@samsonovkirill samsonovkirill commented Sep 19, 2019

Sometimes it's convenient to change gridColumns value on Container rather then per project globally, if it make sense I have a small solution of this problem based on the same idea with a gutter context but Provider is created on Container level and consumes gridColumn on Column level, if there is no gridColumn prop specified in Container the default value from config is applied.
Example:

<Container fluid style={{ lineHeight: '32px' }} gridColumns={13}>
  <Row debug>
    <Col lg={7} debug>1 of 2</Col>
    <Col lg={6} debug>2 of 2</Col>
  </Row>
</Container>

Row consumes value from nearest Container Provider.

@mryechkin
Copy link

Are there any updates on this? I'm looking for this functionality for my project as well

@samsonovkirill
Copy link
Author

Are there any updates on this? I'm looking for this functionality for my project as well

Hello, Mykhaylo! I made a PR but unfortunately maintainers don't wanna to accept this changes. You can fork and use it on your own.

@gerbenmeyer
Copy link
Contributor

It's true that I have been rather busy lately 😃. This is indeed a very good idea, but I would prefer a CustomConfigurationContext over a CustomGridColumnsContext, so that not only gridColumns can be changed per Container, but all global configuration settings. And even more awesome (and generic) would be if the CustomConfigurationContext also replaces GutterWidthContext, so one can also overrule all global confguration per Row. So if we can move to such a context, I'll definitely merge it!

gerbenmeyer
gerbenmeyer previously approved these changes Mar 7, 2021
@gerbenmeyer gerbenmeyer dismissed their stale review March 7, 2021 08:22

Merge conflicts

@gerbenmeyer
Copy link
Contributor

And also has merge conflicts now :)

@samsonovkirill
Copy link
Author

Wow :) Update, I think generic CustomConfigurationContext over custom grid configuration is definitely better idea.

@matheusslg
Copy link

Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants